package com.pig4cloud.pigx.shop.user.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.vo.ShopEquityVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteShopEquityService", value = ServiceNameConstants.SHOP_USER_SERVICE)
public interface RemoteShopEquityService {

	/**
	 * 内部获取权益包详情
	 * @param equityId
	 * @param from
	 * @return
	 */
	@GetMapping("/equity/inner/getShopEquityInnerDetail/{equityId}")
	R<ShopEquityVO> getShopEquityInnerDetail(@PathVariable("equityId") Long equityId,
			@RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 发放权益
	 * @param shopEquityVO
	 * @param from
	 * @return
	 */
	@PostMapping("/equity/receiveShopEquity")
	R receiveShopEquity(@RequestBody ShopEquityVO shopEquityVO, @RequestHeader(SecurityConstants.FROM) String from);

}
